package com.libc.yygh.hosp.core.listener;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

/**
 * *
 * Created with Description:
 *
 * @fileRelativePath: MyAppListener.java
 * @Date: Created on 2022/4/12  16:00  <br>
 * @author: LiBencheng <br>
 * @version: 1.0 <br>
 */
public class MyAppListener implements ServletContextListener
{
    @Override
    public void contextInitialized(ServletContextEvent sce)
    {
        System.err.println("原生的MyListener....contextInitialized...web应用启动..");
        ServletContextListener.super.contextInitialized(sce);
    }

    @Override
    public void contextDestroyed(ServletContextEvent sce)
    {
        System.err.println("原生的MyListener....contextDestroyed...web应用销毁..");
        ServletContextListener.super.contextDestroyed(sce);
        System.err.println("本次运行：" + ((System.currentTimeMillis() - Long.valueOf(System.getProperty("starttime")))) + " ms");
    }
}
